package com.ssm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import com.ssm.mapper.CategoryMapper;
import com.ssm.pojo.Category;
import com.ssm.service.CategoryService;
 
@Service
public class CategoryServiceImpl implements CategoryService{
    @Autowired
    CategoryMapper categoryMapper;
     
    public List<Category> list(){
        return categoryMapper.list();
    }

	@Override
	public int add(Category category) {
		// TODO Auto-generated method stub
		return categoryMapper.add(category);
	}

	@Override
	public int delete(int id) {
		// TODO Auto-generated method stub
		return categoryMapper.delete(id);
	}

	@Override
	public int update(Category category) {
		// TODO Auto-generated method stub
		return categoryMapper.update(category);
	}

	@Override
	public Category get(int id) {
		// TODO Auto-generated method stub
		return categoryMapper.get(id);
	}

	@Override
	public int total() {
		// TODO Auto-generated method stub
		return categoryMapper.total();
	}
}
